from django.db import models
from department.models import DepartmentModel

# Create your models here.
class DoctorModel(models.Model):
    name = models.CharField(max_length=100,verbose_name='医生英文')
    age = models.IntegerField(default=0,verbose_name='年龄')
    position = models.CharField(max_length=100,verbose_name='职位')
    hospital = models.CharField(max_length=100,verbose_name='所属医院')
    department = models.ForeignKey(DepartmentModel, on_delete=models.CASCADE,verbose_name='所属科室',related_name='dep',default=1)
    evaluate = models.CharField(max_length=100,verbose_name='评价')
    answer = models.CharField(max_length=100,verbose_name='回答')
    direction = models.CharField(max_length=100,verbose_name='擅长的方向')


    class Meta:
        db_table = 'dxdoctor'
    def __str__(self):
        return self.name